@model Hub.Domain.Entities.Service

@{
    ViewBag.Title = "Create";
}

<h1>Create <span>Service</span></h1>


@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-field">
            @Html.DropDownListFor(model => model.TypeID, (SelectList)ViewBag.TypeList, "")
            @Html.ValidationMessageFor(model => model.TypeID)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.URL)
            @Html.ValidationMessageFor(model => model.URL)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@*<script type="text/javascript">
    $('#TypeID').change(function () {
        if ($(this).val("1")) {
            $('#URL').attr('disabled', false);
        }

        else {
            $('#URL').attr('disabled', true);
        }
    });
</script>*@
